package com.qingzhuge.sys.controller;

import com.qingzhuge.common.annotation.ASysLog;
import com.qingzhuge.common.enums.EResourceType;
import com.qingzhuge.controller.BasePkLongController;
import com.qingzhuge.core.annotation.AResource;
import com.qingzhuge.dto.response.ResponseBodyDto;
import com.qingzhuge.sys.dto.request.SysNoticeRequestDto;
import com.qingzhuge.sys.dto.response.SysNoticeResponseDto;
import com.qingzhuge.sys.entity.SysNotice;
import com.qingzhuge.sys.service.ISysNoticeService;
import com.qingzhuge.utils.PageUtil;
import io.swagger.annotations.Api;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : zero.xiao
 * @description : 系统公告
 * @date :2018/6/8 0008 下午 14:49
 * @modified :
 */
@ASysLog(value = "系统公告")
@AResource(name = "系统公告",type = EResourceType.menu, catalog = "系统管理")
@Api(tags = "S系统公告")
@RestController
@RequestMapping("sys/notice")
public class SysNoticeController extends BasePkLongController<SysNotice, ISysNoticeService, SysNoticeRequestDto, SysNoticeResponseDto> {


    @Override
    public ResponseEntity<ResponseBodyDto<PageUtil<SysNoticeResponseDto>>> queryPage(@RequestBody(required = false) SysNoticeRequestDto param) {
        return super.queryPage(param);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<SysNoticeResponseDto>> get(@PathVariable Long id){
        return super.get(id);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<SysNoticeResponseDto>> save(@RequestBody SysNoticeRequestDto notice){
        return super.update(notice);
    }


    @Override
    public ResponseEntity<ResponseBodyDto<SysNoticeResponseDto>> update(@RequestBody SysNoticeRequestDto notice){
        return super.update(notice);
    }

    @Override
    public ResponseEntity<ResponseBodyDto<Object>> delete(@PathVariable Long id){
        return super.delete(id);
    }
}
